package com.ichir.projects.uiframework.xml;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlIDREF;
import javax.xml.bind.annotation.XmlRootElement;

import com.ichir.projects.uiflow.definition.FlowType;
import com.ichir.projects.uiflow.definition.IFlowPart;
import com.ichir.projects.uiflow.definition.IProgressAble;

/**
 * 
 * @author mahieddine_ichir
 * @since 1.0.0
 */
@XmlRootElement(name="action")
@XmlAccessorType(XmlAccessType.FIELD)
public class XmlAction extends XmlFlowPart implements IProgressAble {
	
	@XmlAttribute(name="progressId", required=false)
	@XmlIDREF
	private XmlFlowPart progressId;
	
	@Override
	public FlowType getType() {
		return FlowType.ACTION;
	}

	@Override
	public IFlowPart getProgressUiPart() {
		return progressId;
	}

	public XmlFlowPart getProgressId() {
		return progressId;
	}

	public void setProgressId(XmlFlowPart progressId) {
		this.progressId = progressId;
	}
}
